package org.lma;

import java.util.ArrayList;
import java.util.List;

public class LemmaNode {
	
	private int nodeKey;

	private Lemma data;
	
	private LemmaNode parent;
	
	private List<LemmaNode> subs;
	
	public LemmaNode(Lemma data) {
		this.data = data;
		nodeKey = data.getBegin() + data.getLength();
		subs = new ArrayList<LemmaNode>(2);
	}
	
	public int getNodeKey() {
		return nodeKey;
	}

	public void setNodeKey(int nodeKey) {
		this.nodeKey = nodeKey;
	}

	public Lemma getData() {
		return data;
	}
	public void setData(Lemma data) {
		this.data = data;
	}
	public LemmaNode getParent() {
		return parent;
	}
	public void setParent(LemmaNode parent) {
		this.parent = parent;
	}
	public List<LemmaNode> getSubs() {
		return subs;
	}
	public void setSubs(List<LemmaNode> subs) {
		this.subs = subs;
	}
	public void addSub(LemmaNode lemma) {
		this.subs.add(lemma);
	}
}
